import React from 'react'
import './style.less'
import { Link, useHistory } from "react-router-dom"
import SearchInput from "../../../../components/SearchInput"

export default function HomeHeader ({ city }) {

  const history = useHistory()

  function clickHandle () {
    history.push("/city")
  }

  return (
    <div id="homeHeader" className="clear-fix" >
      <div className="home-left" onClick={clickHandle}>{city}<i className="icon-angle-down"></i></div>
      <div className="home-search">
        <i className="icon-search"></i>
        {/* <input type="text" placeholder="搜索您想住的区域或小区" /> */}
        <SearchInput />
      </div>

      <div className="home-right">
        <Link to="/order">
          <i className="iconfont icon-car"></i>
        </Link>
      </div>

    </div>
  )
}
